//
//  LXJSQLiteManager.m
//  FMDB_Practice
//
//  Created by 李旭杰 on 2017/3/13.
//  Copyright © 2017年 李旭杰. All rights reserved.
//

#import "LXJSQLiteManager.h"

@implementation LXJSQLiteManager
+ (instancetype)sharedManager{
    static LXJSQLiteManager *manager;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        // 获取数据库文件路径
        NSString *dbPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).lastObject stringByAppendingPathComponent:@"lxj.db"];
        // 在串行队列上创建数据库
        manager = [LXJSQLiteManager databaseWithPath:dbPath];
    });
    return manager;
}
@end
